﻿
using HBase;
using hCommand;
using Net.http;
using Persistence;

namespace WebApi
{
    [FormAuthenticationFilter]

    [RoutePrefix("CoreTask")]
    public class CoreTaskController : BaseApiController
    {
        ICoreTaskServer coreTaskServer = WMSDalFactray.getDal<ICoreTaskServer>();

        [HttpPost, Route("FindPage")]
        public BaseResult FindPage([FromBody] CoreTaskDto dto)
        {
            Page<CoreTask> info = coreTaskServer.QueryCoreTaskPage(dto);
            return BaseResult.Ok(info);
        }
        [HttpPost, Route("FindYuKuPage")]
        public BaseResult FindYuKuPage([FromBody] CoreTaskDto dto)
        {
            Page<CoreTask> info = coreTaskServer.QueryCoreYTaskPage<CoreTask>(dto);
            return BaseResult.Ok(info);
        }

        [HttpPost, Route("GetListByTaskId")]
        public BaseResult GetListByTaskId(CoreTask model)
        {
            return BaseResult.Ok(coreTaskServer.GetListByTaskId(model.id));
        }
       
     

        [HttpGet, Route("c/{code}/{stn}/{add}"), ControlName("条码入库")]
        public BaseResult instock(string code, int stn, string add)
        {
            var res = WMSTransactionFacade.doStockinLocEngine(code, stn,  0);
            return BaseResult.Ok(res);
        }


    }
}